package psn.zjk.common.algorithm.reverNode;

/**
 * @USER white
 * @DATETIME 2021/1/8 18:41
 */
public class ListNode {
    int val;
    ListNode next = null;

    ListNode(int val) {
        this.val = val;
    }

    @Override
    public String toString() {
        return String.valueOf(val);
    }

    public  ListNode append(){
        int x=val;
        next=new ListNode(++x);
        return next;
    }
}
